<%--
  Created by IntelliJ IDEA.
  User: 11262
  Date: 2022/07/13
  Time: 10:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="/js/jquery-1.4.4.min.js"></script>
    <script>

        //参数 ： JSON字符串 简称JSON串
        let param = {"new_id":666,"name":"gp12","birth":"2222:07:13 11:09:36"};  // K : V  <form
        function ajaxJson() {
            //原始的Ajax
            $.ajax({
                url: "/json/send",
                data: JSON.stringify(param),
                type: "post",//请求体 带着JSON串
                dataType:"json",//请求的数据类型
                contentType: "application/json;charset=UTF-8",//响应数据类型
                success : function(data){
                    console.log(data);
                    //alert(data);
                }
            });
        }
    </script>
</head>
<body>
<input type="button" onclick="ajaxJson()" value="AjaxJson">
</body>
</html>
